<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js">
</script>
<script>
    $(document).ready(function() {

        $('#user').blur(function() {
            $.post('./jquery.php', {
                user: $("#user").text,
                pwd: $('pwd').text()
            }, function(data, statu) {
                // console.log(data, statu);
                $('#pwd').html(data);
            });
        });
    })
</script>

<body>
    <form action="">
        用户名:
        <input type="text" name="username" id="user">
        <span id="info"></span> <br>密码:
        <input type="password" id="pwd"></input>
        <input type="button" value="注册" id="btn">
    </form>
</body>

</html>